package br.com.gp.validation;

import br.com.gp.anotation.DipValidation;

public class ProcessValidation {
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public static final boolean isDefaultValidation(Object obj){
		Class classe =obj.getClass();
		DipValidation dip =(DipValidation) classe.getAnnotation(DipValidation.class);
		if(dip==null){
			return false;
		}else{
			return true;
		}
	}
	
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static final boolean defaultValidationAbilitede(Object obj){
		Class classe =obj.getClass();
		DipValidation dip =(DipValidation) classe.getAnnotation(DipValidation.class);
		if(dip.disable()){
			return false;
		}else{
			return true;
		}
			
	}
}
